﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Atomic.Common
{
    /// <summary>
    /// 分页参数
    /// </summary>
    public class Pager
    {
        /// <summary>
        /// 查询页面，索引从1开始
        /// </summary>
        public int Index { set; get; }
        /// <summary>
        /// 分页大小
        /// </summary>
        public int Rows { set; get; }
    }

    /// <summary>
    /// 泛型分页返回对象
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class Pager<T> : Pager
    {
        /// <summary>
        /// 总记录数
        /// </summary>
        public int Total { set; get; }
        /// <summary>
        /// 当前页记录集
        /// </summary>
        public IList<T> Records { set; get; }
    }
}
